Skip to content

ci: speed up release build with sccache + single cargo invocation#56

Merged
jspaezp merged 2 commits intomainfrom
ci/sccache-release-speedup
Apr 17, 2026
Merged

ci: speed up release build with sccache + single cargo invocation#56
jspaezp merged 2 commits intomainfrom
ci/sccache-release-speedup

Conversation

@jspaezp
Copy link
Copy Markdown
Collaborator

@jspaezp jspaezp commented Apr 17, 2026

Summary

  • Collapse 4 per-bin cargo build calls into one multi---bin invocation to drop redundant workspace resolution/linking.
  • Add mozilla-actions/sccache-action with GHA backend; stacks on top of existing setup-rust-toolchain cache (registry/target) for cross-branch rustc-output caching.
  • CARGO_INCREMENTAL=0 for smaller, more reusable release caches.
  • Print sccache --show-stats post-build for hit-rate visibility.

Motivated by slow Windows jobs in recent release runs (linker-bound on msvc).

Build artifact

Add the build-artifact label on this PR to trigger the release workflow and validate end-to-end on all 4 targets (linux-gnu, linux-musl, macos-arm64, windows-msvc). Check sccache --show-stats in the first run (expect misses) and a second re-run (expect hits) to confirm caching works.

Test plan

- Combine 4 per-bin cargo invocations into one --bin x --bin y call
  to avoid redundant workspace resolution and linking.
- Add mozilla-actions/sccache-action with GHA backend for cross-branch
  rustc output caching.
- Set CARGO_INCREMENTAL=0 for smaller, more reusable release caches.
- Print sccache stats post-build to monitor hit rate.
@jspaezp jspaezp merged commit ac9c659 into main Apr 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant